/**
 * 通过cookie名称获取cookie值
 * @param {*} cookieName 
 */
export function getCookie(cookieName){
    let cookieString = document.cookie;     //获取所有cookie
    let cookies = cookieString.split(";");  //将cookie通过;分割成cookie数组
    for(let index=0; index<cookies.length; index++){
        let temp = cookies[index].split('=');
        if(cookieName == temp[0]){  //找到匹配属性的cookie
            return temp[1]; //返回改属性的值
        }
    }
    return "";
}